class PaginationListLinkRenderer < WillPaginate::ViewHelpers::LinkRenderer
  
  protected

    def page_number(page)
      unless page == current_page
        link("sdfsd", page, :rel => rel_value(page), :title => "First Page")
        link(page, page, :class => "number")
      else
        link(current_page, page, :class => "number current")
      end
    end

    def previous_or_next_page(page, text, classname)      
      if classname == "next_page"
        if page
          link("Next &raquo;", page, :title => "Next Page")+link("Last &raquo;", total_pages, :title => "Last Page")
          # link("<span class='next paginate_button'>.</span>", page) + link("<span class='last paginate_button'>.</span>", total_pages)
        else
          link("Next &raquo;", page, :title => "Next Page", :class => "disabled-page")+link("Last &raquo;", total_pages, :title => "Last Page", :class => "disabled-page")
          # "<span class='next paginate_button'>.</span>" + "<span class='last paginate_button'>"+"paginate</span>"
        end
      else
        if page
          link("&laquo; First", page, :title => "First Page")+link("&laquo; Previous", 1, :title => "Previous Page")
          # link("<span class='first paginate_button'>.</span>", 1) + link("<span class='previous paginate_button'>.</span>", page)
        else
          link("&laquo; First", page, :title => "First Page", :class => "disabled-page")+link("&laquo; Previous", 1, :title => "Previous Page", :class => "disabled-page")
          # "<span class='first paginate_button'>paginate</span>" + "<span class='previous paginate_button'>paginate</span>"
        end      
      end     
    end

    def html_container(html)
      tag(:div, html, container_attributes)
    end

end